#ifndef ATOM_H
#define ATOM_H

#include "vec3.h"


class atom                             // basic type of particle
{
public:
    vec3  f, r0, r1;                     // force on this particle
    int  kx, ky, kz;                   // verlet box position
private:
	int  type;                         // type of atom
    int  id;                           // unique id number 

	vec3  r2, r3, r4, r5;               // Taylor expansion vec3tor	                           
	real mass;                         // mass of the particle
	real recip_em;                     // mass recipetion
	
	real k;                            // spring constant
	vec3  ir0;                          // balanced postion

public:
    atom(){};                          // constructor
	atom(int t0, int id0, real m0, vec3 l0, real k0=0.);
	void predict();
	void correct();
	void binning();
	void periodicx();                  // apply periodic boundary condition in x direction
	void periodicy();                  // apply periodic boundary condition in y direction
	void periodicz();                  // apply periodic boundary condition in z direction
	void addforce(vec3);                // add force to vec3 f
	void clearforce();                 // set force to 0
	void tether();                     // calculate tether force
    void info();               // print the details on this atom

    vec3* getR0();
};

static atom atom_fluid(0, 0, 1, VO);
static atom atom_wall(0, 0, 1, VO, 1);



#endif
